package zh.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zh.demo.dao.AdDao;
import zh.demo.model.AdEntity;

import java.util.List;
import java.util.Map;



@Service("adService")
public class AdService {
	@Autowired
	private AdDao adDao;

	public AdEntity queryObject(Long id){

		return adDao.queryObject(id);
	}

	public List<AdEntity> queryList(Map<String, Object> map){
		return adDao.queryList(map);
	}

	public int queryTotal(Map<String, Object> map){
		return adDao.queryTotal(map);
	}

	public void save(AdEntity ad){
		adDao.save(ad);
	}

	public void update(AdEntity ad){
		adDao.update(ad);
	}

	public void delete(Long id){
		adDao.delete(id);
	}

	public void deleteBatch(Long[] ids){
		adDao.deleteBatch(ids);
	}
	
}
